home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / UTILITIE / CONVERSI / 3760.ZIP / APL2EM.ZIP / SPEAKER.ASM < prev    next >
Assembly Source File  |  1990-03-30  |  3KB  |  87 lines

  1.     Page    58,132
  2.     Title    SPEAKER.ASM    Apple Emulator Speaker Routines
  3. ;******************************************************************************
  4. ;
  5. ;   Name:    SPEAKER.ASM    Apple Emulator Speaker Routines
  6. ;
  7. ;   Group:    Emulator
  8. ;
  9. ;   Revision:    1.00
  10. ;
  11. ;   Date:    January 30, 1988
  12. ;
  13. ;   Author:    Randy W. Spurlock
  14. ;
  15. ;******************************************************************************
  16. ;
  17. ;  Module Functional Description:
  18. ;
  19. ;        This module contains all the code for the Apple speaker
  20. ;    routines.
  21. ;
  22. ;******************************************************************************
  23. ;
  24. ;  Changes:
  25. ;
  26. ;    DATE     REVISION                DESCRIPTION
  27. ;  --------   --------    -------------------------------------------------------
  28. ;   1/30/88    1.00    Original
  29. ;
  30. ;******************************************************************************
  31.     Page
  32. ;
  33. ;  Public Declarations
  34. ;
  35.     Public    Speaker_Toggle        ; Toggle speaker output routine
  36. ;
  37. ;  LOCAL Equates
  38. ;
  39. SPEAKER_PORT    Equ    61h        ; Speaker port address
  40. SPEAKER_DATA    Equ    02h        ; Speaker data bit
  41. ;
  42. ;  Define any include files needed
  43. ;
  44.     Include     Macros.inc    ; Include the macro definitions
  45.     Include     Equates.inc    ; Include the equate definitions
  46.     .286c                ; Include 80286 instructions
  47.     Page
  48. ;
  49. ;  Define the emulator code segment
  50. ;
  51. Emulate Segment Word Public 'EMULATE'   ; Emulator code segment
  52.     Assume    cs:Emulate, ds:Nothing, es:Nothing
  53.     Subttl    Speaker_Toggle    Toggle Speaker Output Routine
  54.     Page    +
  55. ;******************************************************************************
  56. ;
  57. ;    Speaker_Toggle()
  58. ;
  59. ;        Input the speaker port value
  60. ;        Toggle speaker data bit
  61. ;        Output the new speaker port value
  62. ;        Return to the caller
  63. ;
  64. ;    Registers on Entry:
  65. ;
  66. ;        None
  67. ;
  68. ;    Registers on Exit:
  69. ;
  70. ;        AL    - Destroyed
  71. ;
  72. ;******************************************************************************
  73.         Even            ; Force procedure to even address
  74. Speaker_Toggle    Proc    Near        ; Toggle speaker output procedure
  75.     in    al,SPEAKER_PORT     ; Get the current speaker port value
  76.     xor    al,SPEAKER_DATA     ; Toggle the speaker data bit
  77.     out    SPEAKER_PORT,al     ; Output the new speaker port value
  78.     ret                ; Return to the caller
  79. Speaker_Toggle    Endp            ; End of the Speaker_Toggle procedure
  80. ;******************************************************************************
  81. ;
  82. ;    Define the end of the Emulator Code Segment
  83. ;
  84. ;******************************************************************************
  85. Emulate Ends
  86.     End                ; End of the Speaker module
  87.